package deviceinfo.wsm.com.deviceinfo.location;

import java.util.LinkedHashMap;

import deviceinfo.wsm.com.deviceinfo.WsmDeviceInfoSDK;
import deviceinfo.wsm.com.deviceinfo.plugin.com.an.deviceinfo.location.LocationInfo;

/**
 * Created by 王家宝 on 2018/7/9.
 * TEL:18241150668
 * MAIL:639586819@qq.com
 */

public class LocationInfoUtils {

    public static LinkedHashMap<String, String> getAll() {
        LocationInfo locationInfo = new LocationInfo(WsmDeviceInfoSDK.getWsmSDK().getAppContext());
        LinkedHashMap<String, String> result = new LinkedHashMap<>();
        result.put("纬度", locationInfo.getLocation().getLatitude() + "");
        result.put("经度", locationInfo.getLocation().getLongitude() + "");
        result.put("地址", locationInfo.getLocation().getAddressLine1());
        result.put("城市", locationInfo.getLocation().getCity());
        result.put("省份", locationInfo.getLocation().getState());
        result.put("国家码", locationInfo.getLocation().getCountryCode());
        result.put("混合经纬度", locationInfo.getLocation().getLatitude() + "," + locationInfo.getLocation().getLongitude());
        return result;
    }
}
